Optimal allocation strategies in platform trials with continuous endpoints

Platform trials are randomized clinical trials that allow simultaneous comparison of multiple interventions, usually against a common control. Arms to test experimental interventions may enter and leave the platform over time. This implies that the number of experimental intervention arms in the trial may change as the trial progresses. Determining optimal allocation rates to allocate patients to the treatment and control arms in platform trials is challenging because the optimal allocation depends on the number of arms in the platform and the latter typically varies over time. In addition, the optimal allocation depends on the analysis strategy used and the optimality criteria considered. In this article, we derive optimal treatment allocation rates for platform trials with shared controls, assuming that a stratified estimation and a testing procedure based on a regression model are used to adjust for time trends. We consider both, analysis using concurrent controls only as well as analysis methods using concurrent and non-concurrent controls and assume that the total sample size is fixed. The objective function to be minimized is the maximum of the variances of the effect estimators. We show that the optimal solution depends on the entry time of the arms in the trial and, in general, does not correspond to the square root of k allocation rule used in classical multi-arm trials. We illustrate the optimal allocation and evaluate the power and type 1 error rate compared to trials using one-to-one and square root of k allocations by means of a case study.


Introduction
Platform trials compare multiple experimental treatments to a control.They are multi-arm multi-stage trials with the additional feature of allowing arms to enter and leave the trial over time [1,2,3,4].As in multi-arm trials, the common trial infrastructure permits shortening the required time and reducing the costs to evaluate new interventions.In addition, the shared control group increases the statistical efficiency compared to separate parallel group trials and requires fewer patients to be allocated to the control group.However, due to the additional flexibility of platform trials, their design and analysis are more complex.
A major concern when designing and analysing platform trials is the potential presence of time trends, due to, for instance, changes in the patient population being recruited.Especially, if the allocation rates between each of the active treatment arms and the control group vary over time, such time trends can lead to biased treatment effect estimates and hypothesis tests [5,6,7,8].To address such biases, time period-adjusted analyses based on regression models have been proposed [9,10], where the time periods are defined as the time spans where the allocation ratios stay constant.
Time trends are of an even larger concern when so-called non-concurrent controls are used for treatmentcontrol comparisons.Here, for a specific experimental treatment arm, non-concurrent controls refer to the patients allocated to the control group before the arm under evaluation enters the platform trial.In contrast, concurrent controls are the control group patients randomised concurrently (in time) to those in the treatment arm.While including non-concurrent controls in the estimation of treatment effects can increase the power of testing treatment-control differences and reduce the variance of the estimates, they can also introduce bias in the estimates due to time trends if not adjusted for [11,12,13].Also in this context, time period-adjusted analyses based on regression models have been proposed.They can adjust for potential time trends, and thus control the type 1 error and give unbiased estimates, if time trends in all treatment arms are equal and additive on the model scale [14].
In this paper, we derive optimal treatment allocation rates for platform trials under the assumption that a time period-adjusted analysis based on regression models is used.To understand the principles of optimal allocation strategies in platform trials, we focus on the simple setting of a platform trial with two treatment arms and a shared control, where one of the treatment arms enters when the trial is already ongoing.For this platform trial design, we aim to clarify which design elements the optimal allocation ratios depend on and compare the optimal platform trial design with the optimal multi-arm trial design.For the latter, it is well known that for k experimental treatments (and under some additional assumptions), the standard error of treatment effect estimates is minimized for 1 : 1 : . . .: 1 : √ k allocation [15].Several authors discuss the problem of adding a new treatment arm during the ongoing trial using different optimality criteria and statistical analysis procedures.Cohen et al. [16] reviewed statistical methodologies and examples of trials with newly added treatment arms.Choodari-Oskooei et al. [17] centered the attention on the family-wise type 1 error rate when new arms are added.Elm et al. [18] evaluated the operating characteristics of pairwise comparisons of trials adding a new arm over the trial under different approaches.Ren et al. [19] described statistical considerations with respect to type 1 error and power in three-arm umbrella trials.They also discussed the optimal allocation ratio for the control arm in periods in which treatment arms overlap, when minimising the sum of variances of the treatment effect estimators.However, to the best of our knowledge, Bennett and Mander [20] is the only article in which the optimal allocation rates in platform trials are investigated.They optimised the allocation rates to maximize the probability to find all treatments that are better than control, while assuming that the expected treatment effects were equal for all treatment arms.In their approach, treatment comparisons are based on simple group comparisons with z-tests, using concurrent controls.Concurrent data from different periods (where other treatments may have entered or left the platform and the allocation ratios may have changed) are pooled in this approach.However, in platform trials with time trends and changing allocation ratios over time, this approach can lead to an inflation of the type 1 error rate and biased estimates [10].More recently, Pan et al. [21] addressed the modification of the critical boundaries to control the family-wise error rate and re-estimation of the sample sizes when new arms are added, and, similarly as in Bennett and Mander [20] provided the optimal allocation ratios when minimizing the total sample size to achieve a desirable marginal power level, using only concurrent controls and without adjusting for potential time trends.
Here, we optimise allocation rates for a testing procedure based on a regression approach, which includes a "period" effect to account for changing allocation ratios when using period-wise treatment effect estimators and focus the attention on the marginal power.We also consider a different optimisation criterion.Instead of the power to reject all null hypotheses corresponding to effective treatments, we minimise the maximum of the standard errors of the means of the treatment effect estimators resulting from the regression model.This is asymptotically equivalent to maximizing the minimum power across treatments, assuming equal treatment effects.This implies (under some regularity assumptions) that, under the optimal design, the power of the different arms will be equal.In particular, for multi-sponsor platform trials, this is a reasonable feature, as all sponsors should get the same chance to demonstrate the efficacy of their treatments in the platform.In addition, besides platform trials that only use concurrent data to compare treatments against control, we consider trials that incorporate non-concurrent controls as well.
The paper is structured as follows.In Section 2, we introduce the platform trial designs considered and introduce the notation.In Section 3, we derive optimal allocations for trials using concurrent controls only and, in Section 4, do so for trials also incorporating non-concurrent controls.In Section 5, we illustrate the application of different allocation rules (optimal compared to equal allocation and square root of k allocation) by a simulation study based on an example in the context of a hypercholesterolemia trial.We conclude the paper with a discussion.

Trial designs and optimality criterion
Consider a platform trial evaluating the efficacy of two experimental arms (i = 1, 2) against a shared control (i = 0).The trial design allows the sequential entry and exit of the experimental arms, such that the trial initially starts with arm 1 and the control, and arm 2 may enter the platform trial at a later time point.In addition, recruitment to arm 1 may end before the recruitment to arm 2 ends.Thus, the platform trial consists of three periods (s = 1, 2, 3) defined according to the sets of actively recruiting treatment arms I s .In period 1, patients are recruited to treatment 1 and control (I 1 = {0, 1}), in period 2 to both experimental treatments and control (I 2 = {0, 1, 2}) and, in period 3, to treatment 2 and control (I 3 = {0, 2}).
The total sample size of the trial is denoted by N , which is partitioned into the three periods with sample sizes N s , s = 1, 2, 3. We refer to the corresponding proportions of patients by r s = N s /N .In each period s, patients are allocated to the arms i ∈ I s with the allocation proportions p i,s , such that i∈Is p i,s = 1 for s = 1, 2, 3. See Figure 1 for an illustration of the trial design.
Figure 1: Platform trial with two active treatments and three periods.p i,s denotes the allocation proportions of patients in period s (s = 1, 2, 3) to arm i (i = 0, 1, 2), r s = N s /N refers to the proportion of patients in period s, where N s and N are the sample sizes in period s and in the overall trial, respectively.
Let y j denote the observation of patient j on treatment arm i j (j = 1, ..., N , i j = 0, 1, 2), distributed as y j ∼ N (µ i , σ 2 ) where σ is assumed to be known and where we dropped the subindex j in the mean for simplicity.Let θ i = µ i − µ 0 denote the treatment effect for treatment i (i = 1, 2), and consider the null hypotheses H i : θ i ≤ 0.
The simple mean difference between the treatment and control groups are biased estimators of the treatment effects if there are time trends (i.e., the means in the treatment arms change over time) and the allocation rates change across periods.Therefore, we use stratified estimators, stratified by period, that adjust for potential time trends [22,7,23].The stratified estimators are given by where θi,s = ȳi,s − ȳ0,s is the treatment effect estimate in period s for arm i (i = 1, 2), where ȳi,s and ȳ0,s are the sample means in period s for experimental and control arms, and the weights are given by where σ 2 i,s = Var( θi,s ) denotes the variances of the estimates per period, and is given by σ 2 i,s = σ 2 (1/n i,s + 1/n 0,s ).This choice of weights minimizes the variance of the stratified treatment effect estimator.Then, the variance of the stratified effect estimator is given by: A few comments: (i) The stratified estimator is equivalent to the non-stratified estimator if the allocation proportions are equal across periods.(ii) The expressions (3) for the variances apply if the above distributional assumptions hold, i.e, there are no time trends.However, as discussed above, the stratified treatment effect estimate used is also unbiased if time trends are present.(iii) The stratified estimator (and corresponding test) corresponds to the treatment effect estimators in the linear models: where the first model (to test H 1 ) is fit with observations from periods 1 and 2 of the control and treatment arms 1 and 2 and the second model (to test H 2 ) with observations from periods 2 and 3 of the control and arms 1 and 2.Here τ s denotes the period effect which adjusts for potential time trends.The treatment effects are assumed to be constant in time (no time-by-treatment interaction).
The optimality criterion we aim to minimise is the maximum of the variances of the stratified effect estimators across experimental treatment arms.Thus, given a fixed overall sample size N , we aim to find the allocation probabilities p = (p 0,1 , p 1,1 , p 0,2 , p 1,2 , p 2,2 , p 0,3 , p 2,3 ) that minimise the objective function max(Var( θ1 ), Var( θ2 )).(6) Note that if the expected effect sizes are equal for both experimental arms, minimizing this objective function will also maximize the minimum individual power.Furthermore, as N is only a scaling factor in (3), the optimal allocation does not depend on N .

Optimal Designs
We derive optimal designs minimizing the objective function (6) for three different cases: Case 1: Unrestricted optimization.In this setting, the entry time for treatment 2 (corresponding to r 1 ) is a design parameter that is determined by the trial design rather than being externally governed, e.g., by the time a new treatment becomes available to be included in the trial.Similarly, the time from entry of treatment 2 and completion of the sub-trial corresponding to treatment 1, r 2 , is a design parameter in this case, which can also be chosen.We therefore optimize over p and r 1 , r 2 (r 3 is then given by r 3 = 1 − r 1 − r 2 ).
Case 2: Fixed sample size in period 1.We fix r 1 and optimize p and r 2 .In this case, the entry time of arm 2 is not subject to optimization.
Case 3: Fixed sample sizes in all three periods.In addition to r 1 , we also fix r 2 (and thus also r 3 ).Therefore, this case corresponds to a design in which both r 1 , the entry time of arm 2 and the completion time of arm 2 (given by r 1 + r 2 ) are predefined, and we optimize over p only.
In the derivations, we assume that the sample sizes are positive real numbers such that the variance of the estimators (3) is a differentiable function of the sample sizes.This is a reasonable approximation for large sample sizes.The derivations were performed in Mathematica (see the Supplementary Material, Section C and GitHub (https://github.com/MartaBofillRoig/Allocation).In calculations resulting in several solutions, we selected those resulting in real values between 0 and 1 based on numeric examples only.

Case 1: Unrestricted optimization
In this case, the optimal design satisfies r 2 = 1 (and r 1 = r 3 = 0) such that all patients are recruited in period 2. In this design, there is only a single period and the effect estimates reduce to the non-stratified mean differences.The one-period design is optimal because then all control observations are shared and are used in both treatment effect estimates, and a non-stratified estimate is applied which, under the model assumption of no time trend, also reduces variance.The resulting trial is a classical multi-armed trial with many-to-one comparisons [15].For this design, it is well known that the optimal allocation is p Note that the optimal allocation satisfies the constraint V ar( θ 1 ) = V ar( θ 2 ).(7) This follows by the following argument: Assume the variances at the optimal allocation are not equal, e.g., that V ar( θ 1 ) < V ar( θ 2 ).Then the objective function can be further decreased by moving a small fraction of the sample size from treatment 1 to treatment 2 such that the inequality still holds.This shift reduces the V ar( θ 2 ) and thereby the maximum of the two variances.This is a contradiction to the assumption that the allocation is optimal.
3.2 Case 2: Fixed sample size in period 1 Assume that the time point when the second treatment enters the platform trial is given.Thus, the size of period 1, r 1 , is fixed and we optimize (6) in r 2 and p.As noted above, the optimal allocation in the first and third periods is equal allocation.For the optimal allocation in period 2, we distinguish between the cases r 1 > 1/2, where period 1 is larger than half of the total sample size and therefore for all allocations the variability of θ 2 is larger than that of θ 1 and r 1 ≤ 1/2 where under the optimal allocation the variances of the two estimates are equal.
If r 1 > 1/2, then, for all allocations (even if all observations after arm 2 enters are allocated to arm 2 and the control), we have V ar( θ2 ) > V ar( θ1 ) such that in this case also the optimum allocation does not satisfy (7).However, as the objective function is the maximum of the two variances, it is minimized in this case, if all patients j > N 1 are equally allocated to treatment 2 and control, i.e., for p 0,1 = p 1,1 = 1/2, p 0,3 = p 2,3 = 1/2, and r 2 = 0.This optimal solution corresponds to two separate consecutive trials, wherein the first period we compare arm 1 versus control, there is no second period, and in the third period, we use the remaining sample size to compare arm 2 versus control.Note that all design settings comprising only two periods and two arms per period, that is p 0,2 = p 2,2 = 1/2, p 1,2 = 0 with 0 ≤ r 2 ≤ 1 − r 1 and r 3 = 1 − r 1 − r 2 , minimize the variance and would be optimal solutions too.In these designs, the allocation ratio is the same in periods 2 and 3, and all patients in periods 2 (and 3) are equally allocated to treatment 2 and control.
Otherwise, if r 1 ≤ 1/2, similar as in Case 1 the optimal design satisfies that the variances of the effect estimators are equal (7).Furthermore, for the optimal design we have r 2 = 1 − r 1 and r 3 = 0.While this can be confirmed by numerical optimisation -see Figure 3 where the maximum of the two variances compared to separate trials is plotted with respect to r 2 and note that the maximum variance reduction occurs for r 1 + r 2 = 1, there is also a heuristic argument for this result: For any given three-period platform trial (with r 1 , r 2 , r 3 > 0), we can define a corresponding two-period platform trial with the same sample sizes in each arm.This can be obtained by shifting the observations from arms i = 0, 2 in period 3 to the respective arms in period 2 such that r 3 = 0. Now, by recruiting all control arm patients from period 2 onward in period 2, instead of splitting them between periods 2 and 3, the sample size of the control arm in the estimate of θ 1 increases and therefore the variance of the estimator is reduced.In addition, the variance of θ 2 is not increased in this design, as the number of observations in the control arm used in the estimate of θ 1 does not change and, as r 3 = 0, a non-stratified estimate is used, which has a lower variability than the stratified estimate (under the model assumption of no time trend).
The optimal allocations p 0,2 , p 1,2 and p 2,2 can be obtained numerically as special case of Case 3, setting r 2 = 1 − r 1 , outlined below.Hence, the optimal design is a two-period trial in which arm 2 enters later, but both arms finish at the end of the trial.

Case 3: Fixed sample sizes in all three periods
Assume that, in addition to the time point when treatment 2 enters, r 1 , also the number of patients in period 2, r 2 , is fixed.For the optimal allocation in period 2, we now consider three situations.(i) If r 1 ≥ 1/2, as in Case 2, the optimal allocation allocates all patients after period 1 to treatment arm 2 and control, with equal allocation between the two arms.This is achieved, e.g., for p 0,1 = p 1,1 = p 0,2 = p 2,2 = p 0,3 = p 2,3 = 1/2 and p 1,2 = 0. (ii) If r 1 + r 2 ≤ 1/2, then for all allocations, the maximum variance is the variance of θ1 and therefore (as in Case 2) the optimal design allocates all observations in period 2 to treatment 1, such that p 0,2 = p 1,2 = 1/2, p 2,2 = 0. (iii) If, on the other hand, r 1 < 1/2 and r 1 + r 2 > 1/2, the argument as for Case 2 implies that the variances of the two treatment effect estimators are equal, (7), holds under the optimal allocation.To optimise under this constraint, we use the method of Lagrange multipliers, which shows that the solution satisfies Now, p 2,2 can be obtained as the numerical solution of (9) and p 0,2 is given by (8).As the sum of the allocation proportions is 1 also p 1,2 results.Note that by (9) that the optimal solution depends on r 1 , r 2 only via r 2 /(1 − 2r 1 ).
Figure 2 shows the optimal allocation probabilities p i,2 , i = 0, 1, 2 in period 2 as function of r 2 for different r 1 .The optimal allocation ratio p 0,2 for the control is not monotone in r 2 but takes its minimum at r 2 = 1 − 2r 1 , i.e., where r 1 = r 3 .For this special case, we can derive an explicit solution for the optimisation problem.As in this case, the objective function is symmetric in the two treatments, it follows that V ar( θ1,1 ) = V ar( θ2,3 ).Therefore, to satisfy constraint (7), also V ar( θ1,2 ) = V ar( θ2,2 ) needs to hold.The latter, however, implies that in period 2 the allocation ratios for both treatment arms have to be equal, such that p 1,2 = p 2,2 .Furthermore, by results for the many-to-one setting [15], we know that the variances are minimized for 1 : 1 : This can be also verified by substituting the solution in (9).
In order to illustrate further cases apart from those included in the paper, we built a shiny app (available at https://github.com/MartaBofillRoig/Allocation) that allows visualising the allocation rates with respect to the sample sizes per period 2. The app also shows the variance in the optimum as a function of r 2 .Figure 3 includes one of the figures that can be obtained in the app.On the bottom, we see the variance with respect to the proportion of r 2 = N 2 /N compared to the variance when running two separate trials.We can observe that the decrease in variance becomes larger with r 2 .

Optimal allocation in trials using non-concurrent controls
Suppose we want to use also non-concurrent controls to compare arm 2 against the control.To this end, we consider the regression model estimate of the treatment effect of treatment 2 from the model We fit this model based on all observed data in periods 1, 2 and 3.This model provides unbiased treatment effect estimators and controls the type 1 error if time trends affect all arms equally and are additive on the model scale [14].For treatment 1, we suppose that the efficacy is evaluated after treatment arm 1 ends, as is common in platform trials.Thus, we do not use the estimate from this model, but the stratified treatment effect estimators defined in (4) based on data from treatment 1 and the control group from stages 1 and 2 only.
Using the regression model (10) to incorporate non-concurrent controls implies that the treatment effect of arm 2 compared to control is estimated by the stratified treatment effect estimator where ȳ.,s is the pooled mean per period, and ω i,s are weights, which are functions of the sample sizes.As a consequence, also the variance of θ 2 can be written as a function of the rates r and the total sample size N .This variance is given by , i = 0, 1, 2 in period 2 as function of r 2 and different r 1 for trials with three-periods as in Figure 1.Black lines: p 0,2 , red line p 1,2 , blue line p 2,2 .The vertical line at r 2 = 1 − 2 * r 1 indicates the setting, where equal allocation between treatments 1 and 2 is optimal.There the optimal allocation ratio to control is p 0,2 = 1/(1 + √ 2) (indicated by the upper gray line).Solid lines correspond to optimal allocations in trials utilising concurrent controls only (Sect.3), and dashed lines correspond to optimal allocations in trials utilising concurrent and non-concurrent controls (Sect.4).
See the Supplementary Material Section A2 for the derivation and the expression of the weights ω i,s .For arm 1, for which the treatment effect is estimated using only concurrent controls, the treatment effect estimator and its variance are given by ( 1) and (3), respectively.
As in Section 3, we aim to minimise the maximum of the variances max(Var( θ 1 ), Var( θ 2 )) in r and discuss the optimal allocations for unrestricted optimisation (Case 1), where the entry time of treatment 2 is fixed (Case 2) and where both the entry time of treatment 2 and the completion time of treatment 1 are given (Case 3).
Note that it is evident from ( 3) and ( 12) that for all r 1 , r 2 , r 3 (and thus for all three considered cases), the optimal allocation in periods 1 and 3 is equal allocation, i.e., p 0,1 = p 1,1 = p 0,3 = p 2,3 = 1/2.Therefore, it Figure 3: Optimal allocations per arm in period 2 and decrease in the maximum of the two variances compared to separate trials for trial designs using concurrent controls only (solid line) and using concurrent and non-concurrent controls (dashed line).remains to determine the optimal allocation ratios in period 2 in the three cases.

Case 1: Unrestricted optimization
As for the setting using concurrent controls only, without restrictions with respect to the time at which arm 2 enters the platform, the optimal allocation rates correspond to a multi-arm design where all treatment arms start and end at the same time, such that there are no non-concurrent controls.This follows because then all control patients are used in direct comparisons for both treatment arms.Then, the optimal allocation is 1 : 1 : √ 2 allocation as in Section 3.

Case 2: Fixed sample size in period 1
Suppose we aim at optimising a design where the time at which arm 2 enters is given.Therefore, as in Case 2 for trials using concurrent controls only (Section 3.2), we optimise assuming that r 1 is fixed.
We consider two cases: r 1 ≥ 1/2 and r 1 < 1/2.If r 1 ≥ 1/2, as in the case of concurrent controls, the optimal allocation allocates all patients after period 1 to treatment arm 2 and control, with equal allocation between the two arms.This is achieved, e.g., for p 0,1 = p 1,1 = 1/2, p 0,3 = p 2,3 = 1/2 and p i,2 = 0, i = 0, 1, 2 such that r 2 = 0. Note that this design has only two periods and the model ( 10) is fitted without the period effect τ 2 as there is no data to estimate this factor in this case.In addition, the non-concurrent controls do not contribute to the treatment effect estimator (only the weight ω 2,3 in ( 11) is larger than zero) because only the control treatment is present in both periods.Therefore, the period effect can only be estimated from the control group data and consequently the estimate of the control group treatment (and also the treatment effect estimate for treatment 2) cannot be improved by estimates from other treatments.
To see that the above allocation is optimal, note that V ar( θ2 ) defined in ( 12) is minimized by r 3 = 1 − r 1 , r 2 = 0 and p 0,3 = p 2,3 = 1/2 if r 1 is kept fixed and for this allocation the variance V ar( θ2 ) does not depend on the allocation ratios in period 1.Furthermore, because r 1 ≥ 1/2 and assuming equal allocation between the control arm and arm 1 in period 1 we have V ar( θ1 ) ≤ V ar( θ2 ).Therefore, under an allocation ratio that minimizes V ar( θ2 ) the objective function, the maximum of the variances of the treatment effect estimates is the variance of treatment 2. It follows, that this allocation ratio also minimizes the objective function.
If r 1 < 1/2, as in Case 2 in Section 3, the optimal design satisfies that r 2 = 1 − r 1 , and therefore it leads to a two-period platform trial, where treatments 1 and 2 complete recruitment at the same time and there is no period 3.While this can be seen by inspection of Figure 3, there is also an argument for this result.First, note that for any given three-period platform trial (with r 2 , r 3 > 0), we can achieve the same sample sizes for each arm in a two-period platform trial, shifting all observations from period 3 to period 2 such that r 3 = 0. Now, after period 1, recruiting all observations of the control arm in period 2 instead of splitting them between periods 2 and 3, increases the sample size of the control arm for the estimate of θ 1 and therefore reduces its variance.Also, the variance of θ2 is not increased, as the number of concurrent controls for arm 2 is not affected and, as r 3 = 0, the model ( 10) is fitted with one parameter less (without τ 3 ) in this case.
It remains to determine the optimal allocation in period 2 for the resulting two-period platform trial.In this case, the effect size estimate of treatment 2 using non-concurrent controls (11) can be written as where ) and its variance simplifies to: where q i,s = p i,s (1 − p i,s ).We now minimise max(Var( θ 1 ), Var( θ 2 )), where Var( θ 1 ) and Var( θ 2 ) are defined by ( 3) and ( 14), respectively.For given r 1 and assuming that r 3 = 0 the variances under the optimal allocation are equal and we obtain an explicit expression for the optimal allocation by minimizing Var( θ 1 ) setting p 01 = p 11 = 1/2.The resulting formula for the allocation proportions in period 2 are: where 4 displays the optimal allocations as a function of r 1 both, for trials using non-concurrent controls (dashed lines) and using only concurrent controls (solid lines).Comparing the period 2 allocation rates of the optimal designs with non-concurrent and only concurrent controls, one sees that the latter allocates more patients to the control group.Allocation Ratios Period 2 Figure 4: Optimal allocation probabilities r i,2 /r 2 , i = 0, 1 in period 2 as function of r 1 for trials with two-periods (r 3 = 0).Black, red and blue lines represent the allocation rates to control, arm 1 and arm 2, respectively.Solid lines refer to analysis with concurrent controls only, and dashed lines to analysis with concurrent and non-concurrent controls.

Case 3: Given sample sizes in periods 1 and 2
We now assume that r 1 > 0 and r 2 < 1 are fixed (and not optimised) corresponding to a three-period platform trial in which arm 2 enters later and arm 1 finishes before arm 2 does (Figure 1).As for concurrent controls, we distinguish 3 situations: (i) If, r 1 > 1/2, as in Case 2, the optimal design allocates all patients j > N 1 equally to treatment 2 and control, i.e., for p 0,1 = p 1,1 = p 0,2 = p 2,2 = p 0,3 = p 2,3 = 1/2, and p 1,2 = 0. (ii) As for concurrent controls, if r 1 + r 2 ≤ 1/2, then for all allocations, the maximum variance is the variance of θ1 (inclusion of non-concurrent controls can only reduce the variance of θ2 ) and therefore the optimal design allocates all observations in period 2 to treatment 1. (iii) If r 1 < 1/2 and r 1 + r 2 > 1/2, we minimise max(Var( θ 1 ), Var( θ 2 )), by minimizing Var( θ 1 ) in p for fixed r 1 and r 2 .In this case, the two variances are equal under the optimal allocation.As we could not obtain an analytical solution for the optimization problem in this case, we minimized Var( θ 1 ) in the remaining free variables p 1,2 , p 2,2 under the constraint of equal variances with the Mathematica function FindMinimum or the r-package nloptr [24] using the sequential quadratic programming algorithm for nonlinearly constrained gradient-based optimization [25].See Section C in the Supplementary Material.Numerical solutions for the optimal allocations in period 2 are shown in dashed lines in Figure 2. As expected, the larger r 1 , the larger the difference between designs utilising non-concurrent controls compared to designs with concurrent controls only, as the size of the non-concurrent control group is then larger.The pattern of the optimal allocation rates is similar to the scenario where concurrent controls only are used.However, the ratio of patients assigned to the control group is lower when non-concurrent controls are used.Furthermore, it may be lower than the number of patients assigned to arm 1 or 2 (which does not occur with concurrent controls).

Example and simulation study
We illustrate the optimal allocations in platform trials by means of a phase II placebo-controlled trial in primary hypercholesterolemia [26].In this trial, the goal was to evaluate the efficacy of 80 mg of the antibody atorvastatin with SAR236553 as compared to atorvastatin alone.Additionally, there was interest in evaluating other doses and combinations, in particular, to investigate the efficacy of 10 mg of atorvastatin plus SAR236553 compared to atorvastatin alone.The primary endpoint was the percent change in calculated LDL cholesterol from baseline.Patients were randomly assigned according to a 1:1:1 allocation to receive a 80 mg of atorvastatin plus SAR236553, 10 mg of atorvastatin plus SAR236553, or 80 mg of atorvastatin plus placebo.
We revisit the design of this trial to discuss three allocation strategies: equal allocation (1:...:1), square root of k (1:...: √ k) and the proposed optimal allocations.We assume the total sample size as in the original trial, N = 92, and mean responses and variances in the control group according as observed in the trial (i.e., a mean of 4.94 with variance 1 in the control), and consider means equal to 5.66 and variance 1 for the experimental treatment arms, which lead to 80% power at 0.025 significance level in a multi-arm design setting using the square root of k allocation.Furthermore, we considered three designs depending on the entry and end of arm 2 in the trial, that is: 1. Design with one period only (that is, multi-arm design), and thus with sample sizes per period N 1 = N and N 2 = N 3 = 0 as Case 1 (in Section 3.1).
2. Design with two periods (arm 2 starts later, but arms 1 and 2 finish at the same time), as Case 2 (in Section 3.2), assuming a sample size of N 1 = N/4 in period 1 and N 2 = 3N/4 in period 2.
3. Design with three periods (arm 2 starts later and finishes after arm 1 does), as Case 3 (Section 3.3), considering two situations: After rounding, we obtain, e.g., for the three-period design, N 1 = N 3 = 31, and N 2 = 30.We consider the analysis for comparing groups based on concurrent data only.For each design configuration and allocation strategy, we describe the sample size per period and arm.Furthermore, we compare the statistical individual power for each treatment control comparison and also evaluate the variance of the estimates by simulating 100000 trials.In the main manuscript, we report simulation results where no time trends were assumed.In the Supplementary Material (Section B.3), results for trials with time trends are presented.
We start with the standard multi-arm design (Case 1).In this case, as discussed before, the optimal allocation coincides with the root of k rule (see Table 1 in the Supplementary Material).The power of testing treatments against control is the same in both designs, equal and optimal allocations.When comparing the power of the design with optimal allocations against the design with 1:1 allocation, we can see that there is an increase in power when using the optimal design and the confidence intervals (CIs) are narrower (see Table 1).However, it could also be noted that in this example, the difference is not substantial.
Suppose now that the second arm enters while the trial is ongoing, but that it is assumed to end with the first arm.This situation would lead to a two-period design.Tables 2 in the Supplementary Material shows the sample sizes per arm and period.We can observe that the designs using optimal allocations and using the root of k rule differ.The optimal strategy allocates fewer patients to the first arm in the second period, and more to the second arm in the second period, while maintaining equal allocation between arm 1 and control in the first period as is the case for the one-to-one and square root of k allocations.When comparing the powers, the results are as expected considering the optimization strategy: the power of testing the efficacy of arm 1 versus control is larger than the power of the comparison regarding arm 2 when using 1:1 allocation and square root of k allocation (see Table 1).Under the optimal allocation strategy, the power and standard errors of effect estimates for both treatment control comparisons are the same.As we minimize maximum variance, we see that the maximum power is smaller under the optimal allocation.Similarly, the (maximum) width of the CIs for the optimal design is smaller than the maximum width of the CI of the other designs.
Finally, consider a design in which arm 2 enters after arm 1, and in addition, the timing when arm 1 ends is fixed at some point before the end of the trial.For the resulting three-period trial, we consider two scenarios.In the first, the total sample sizes for periods 1 and 3 are assumed to be equal.Note that this also implies that the total sample sizes for arms 1 and 2 are equal.Then, in the second period, the optimal allocation is the square root of k allocation.When increasing the sample size of period 2 (such that r 3 < r 1 ) this is no Table 1: Power for each design according to the allocation strategy.Here r 1 and r 2 are the proportion of patients allocated to periods 1 and 2, respectively; "one" denotes one-to-one allocation, "opt" denotes optimal allocation and "sqrt" denotes the square root of k allocation; "Power A i " is the estimated power when testing A i against control (i = 1, 2), and "CI Width A i " refers to the width of the confidence interval for the treatment effect of arm A i compared to control.Note that the optimal allocation coincides with the square root of k in the 1-period design and 3-period design with longer the case.Moreover, as the period where the control arm is shared increases, with the optimal design also the power increases for larger r 2 (see Table 1).Under both choices of r 2 , the (minimum) power of the optimal design is larger than the minimum power using the 1:1 and square root of k allocation strategies.See Tables 2 and 3 for the sample size per arm and period assumed for each allocation strategy.We also evaluated the type 1 error under the different allocation strategies.In all the considered designs, the type 1 error is controlled (see Table 5 in the Supplementary Material), even if there are time trends (see Section B.3 in the Supplementary Material).However, in the latter case, the variances might slightly deviate because the time trends may increase the variability in the treatment groups.
Table 2: Sample size distribution per arm and period according to the allocation strategy for a three-period design where arm 2 starts later and finishes after arm 1 does, and with

Discussion
We derived optimal allocation rules for platform trials, minimizing the maximum variance of the treatment effect estimators of treatment-control comparisons.The most efficient design is the multi-arm trial, where all treatments start and end at the same time.However, this may not be feasible if, e.g., not all treatments are available at the start.Under the assumption that some treatments enter the trial at a later time point, we showed that in the optimal design, all treatments finish at the end of the platform trial.This again, however, will in general not be practical.Therefore, we considered optimal designs under constraints on the entry and exit times of treatment arms.
In contrast to earlier work, we performed the optimisation assuming that the analyses to compare the efficacy of treatments against control are adjusted with the categorical factor time period.These periods are defined by the time intervals in which no arm enters or leaves the study.Adjusted analyses are recommended in this case to avoid potential biases caused by time trends.Note that the optimal allocation depends on the chosen analysis model.
In this work, we assumed that the total sample size of the platform trial is known.Although the total sample size is only a scaling factor in the optimisation problem, this assumption might be unrealistic in this type of trials.However, an equivalent strategy to the one followed to optimise the allocation rates would be to consider a targeted minimum precision (corresponding to the maximum variance) for the estimates of the treatment effects, assuming that these are equal, and minimise the total sample size of the trial.To this end, we need to search for the total sample sizes N such that the minimum precision of the corresponding optimal design is equal to the target precision.As the optimised minimum precision is monotonic in N , this corresponds to a simple numerical root finding.
Changing the allocation ratio in a clinical trial has been controversially discussed in the context of response adaptive randomisation [27,28].The main concern is the need to adjust for potential time trends, which leads to statistical inefficiency.Also, for platform trials, we saw that the statistically most efficient design is a multi-arm trial, where allocation ratios stay constant over time.However, if it is not feasible to start and complete all arms at the same time, but some arms enter the trial at a later time point, or complete recruitment before the end of the platform trial, a change in the allocation ratios is optimal, also for analysis procedures that adjust for the time trends.
In this manuscript, we optimised the allocation ratios under the assumption that the times when the second treatment enters or leaves the platform are known.In many realistic settings, these times may, however, be unknown at the start of the trial.In the resulting, optimal trial designs, however, the optimal allocation ratio in the first period is always 1:1 randomisation and, thus, does not depend on r 1 and r 2 .The optimal allocation ratios for period 2 can be computed when treatment 2 enters the platform and r 2 determining when treatment 1 should be completed is fixed.This holds for both, analysis including non-concurrent controls and concurrent controls only.If it is desirable to use equal allocation among the experimental treatment arms, one can choose r 2 such that the optimal design satisfies this condition (see Figure 2).For the analysis using concurrent controls only, the optimal allocation in period 2 is then a 1 : 1 : √ 2 allocation.Our manuscript aims to advance the understanding of optimal allocation principles in platform trials.To accomplish this, we centered our focus on a trial design with two experimental arms and a shared control arm.The derivation of optimal allocation rules for platform trials with more than two arms is an open problem and subject to further research.

Supplementary Material
Web Supplementary Material, including the derivations of the variance of the treatment effect estimators and additional results from the case study, is available with this paper.Mathematica and R code to reproduce the results are available at https://github.com/MartaBofillRoig/Allocation.... In this supplementary material, we provide the calculations of the variance estimators (Section A) and additional results concerning the simulation study (Section B).Mathematica and R code to reproduce the results are available at https://github.com/MartaBofillRoig/Allocation.However, for the reader's convenience, we also include the Mathematica files at the end of this document.

A Variance derivations
Consider the same notation used in Section 2 of the article and let n i,s , i = 0, 1, 2, s = 1, 2, 3 be the sample sizes in arm i, period s of the platform trial design.

A.1 Variance for effect estimators using concurrent controls only
Consider the period-wise treatment effect estimators of the form where θi,s = ȳi,s − ȳ0,s is the treatment effect estimate in period s for arm i (i = 1, 2), where ȳi,s and ȳ0,s are the sample means in period s for experimental and control arms, and the weights are given by where σ 2 i,s = Var( θi,s ) denotes the variances of the estimates per period, and is given by Then, the variance of the estimator is then given by: as p i,s = ni,s rsNs and r s = Ns N .

A.2 Variance for the effect estimator using concurrent and non-concurrent controls
In this section, we first derive the expression of the effect estimators using concurrent and non-concurrent controls and then give the variance expressions.Note that in what follows, the treatment effect estimator for arm 1 uses concurrent and non-concurrent controls as well, as arm 2 does.However, in the case of arm 1, non-concurrent controls are those patients allocated to the control in period 3.For the purpose of optimal allocations in this paper, we are only interested in the estimator of arm 2, but we give here the expressions of the estimator of arm 1 for completeness.
In Section A.2.1, we derive the expressions of the estimators and the corresponding variances when utilising non-concurrent controls together with concurrent controls.In Sections A.2.2 and A.2.3, we give the expressions for the particular case of a platform trial with two-periods and three-periods, respectively.The expressions given in the later sections are the ones we use in Section 4 of the manuscript.

A.2.1 Effect estimator using concurrent and non-concurrent controls
We assume a linear model E(y) = Xθ where θ = (µ 1 , µ 2 , µ 3 , θ 1 , θ 2 ) ′ is the parameter vector with baseline stagewise responses µ s and treatment effects θ i .X is the design matrix and y the vector of independent observations with a constant variance σ 2 (without loss of generality, σ = 1).
The Gauss-Markov (best linear unbiased) estimator of θ is θ = (X ′ X) −1 X ′ y.It is best linear unbiased in the sense that for any other estimate θ = Ay with E( θ) = θ, Cov( θ) − Cov( θ) is positive semidefinite which in turn implies that the variance of any component of θ is at a minimum among these unbiased linear estimates.We have In the specific case here, the design matrix is where 1 x denotes a vector of x ones.Hence, where N s is the sample size per period, that is, We can use the technique of inverting block-partitioned matrices here.If we write then, by this technique, we obtain Regarding the point estimates, it is possible to simplify to where ȳi,s is the pooled mean per arm and period, and ȳ.,s is the pooled mean per period.Note, however, that θ i cannot, in general, be represented as a weighted average of stagewise treatment effect contrasts, i.e. as 2 i=1 3 s=1 w i,s • (ȳ i,s − ȳ0,s ).We focus on the treatment effect estimator for treatment 2 only, given that this is the arm in which we use non-concurrent controls.Assume now that N s = r s N is the sample size in period s and r i,s = ni,s N is the fraction of patients in arm i = 0, 1, 2 and period s among all patients such that r s = i∈Is r i,s and r 1 + r 2 + r 3 = 1.Var( θ 1 ) and Var( θ 2 ) are the diagonal of (1.b).With this notation, we can write the variance as where p i,s = ri,s rs is the proportion of patients in treatment group i of period s.We assume that r 1 is fixed.Minimizing Var( θ i ) is equivalent to maximizing Var( θ i ) −1 .Denoting by q js = p js (1 − p js ), we obtain Var( θ 2 ) −1 ∝ r 3 q 23 + r 2 q 22 − r 2 2 p 2 12 p 2 22 r 1 q 11 + r 2 q 12 . (1.e)

A.2.2 Two-period trial
Consider a two-period trial, where arm 2 enters later and finishes at the same time that arm 1, as illustrated in Figure 3 of the paper.The treatment effect estimator for treatment 2 using non-concurrent controls can then be written as where The variance of the estimator θ 2 is then rsNs , then:

Three-period trial
Suppose now a three-period platform trial in which arm 2 enters later and arm 1 finishes before arm 2 does (see Figure 1 in the paper for an illustration).The treatment effect estimator for comparing arm 2 against control when using the model-based approaches is where ŷ.,s is the pooled mean per period, and where ω i,s are given by: The variance of the estimator θ 2 is given in (1.d).

B.1 Sample sizes per period and arm
In what follows, we describe the sample size distribution per period and arm according to each design configuration and allocation strategy.
The considered designs are: 1. Design with one period only (that is, multi-arm design), and thus with sample sizes per period N 1 = N and N 2 = N 3 = 0.
2. Design with two periods (arm 2 starts later, but arms 1 and 2 finish at the same time), assuming a sample size of N 1 = N/4 in period 1 and N 2 = 3N/4 in period 2.
3. Design with three periods (arm 2 starts later and finishes after arm 1 does), where considering two situations: where N = 92.The following tables depict the sample size per arm and period according to each design and with respect to the allocation strategy.Table 3: Sample size distribution per arm and period according to the allocation strategy for a three-period design where arm 2 starts later and finishes after arm 1 does, and with (c) Optimal allocations Table 4: Sample size distribution per arm and period according to the allocation strategy for a three-period design where arm 2 starts later and finishes after arm 1 does, and with N 1 = N/3, N 2 = 2(N − N 1 )/3 and N 3 = (N − N 1 )/3.

B.2 Results under the null hypothesis
In this section, we report the results of the simulations under the null hypothesis.In this case, we considered means for the treatment arms equal to 4.94 as in the control group, and variances equal to 1. Table 5 summarizes the results.We can observe that the type 1 error is controlled in all considered scenarios.

B.3 Results for trials with time trends
In this section, we present the results of the case study for trials with time trends.We considered the designs presented in the previous section, and the same parameter settings as in the paper: a total sample size of N = 92, the mean in the control is 4.94 with variance 1, and means equal to 5.66 and variance 1 in the treatment arms.In this simulation, however, we considered step-wise time trends.Specifically, the data are Table 5: Type 1 error (T1E) rates for each design according to the allocation strategy.Here r 1 and r 2 are the proportion of patients allocated to periods 1 and 2, respectively; "one" denotes one-to-one allocation, "opt" denotes optimal allocation and "sqrt" denotes the square root of k allocation; "T1E A i " is the estimated type 1 error when testing A i against control (i = 1, 2), and "CI Width A i " refers to the width of the confidence interval for the treatment effect of arm A i against control.generated according to the model where η 0 is the control response in period 1, θ k is the treatment effect for arm k, f (•) represents the time trend function and t j is the calendar time when patient j is enrolled in the trial, where f (j) = λI(j > N 1 ).
Here λ represents the strength of the time trend, which is considered to be λ = 0.25 in the simulations.
In the following tables, we present the resulting power and type 1 error for each design and allocation strategy.We can see that the results also hold for trials with time trends and that the type 1 error is maintained.

C Mathematica files
The following Mathematica notebook files are now displayed: • suppmat-CC.nb:Computation on designs with concurrent controls only.
Mathematica and R code files are also available at https://github.com/MartaBofillRoig/Allocation.Table 6: Power for each design according to the allocation strategy for a trial with stepwise time trends (see (2.h) for the data generation).Here r 1 and r 2 are the proportion of patients allocated to periods 1 and 2, respectively; "one" denotes one-to-one allocation, "opt" denotes optimal allocation and "sqrt" denotes the square root of k allocation; "Power A i " is the estimated type 1 error when testing A i against control (i = 1, 2), and "CI Width A i " and "Variance A i " refers to the width of the confidence interval and variance, respectively, for the treatment effect of arm A i against control.7: Type 1 error (T1E) rates for each design according to the allocation strategy for a trial with stepwise time trends (see (2.h) for the data generation).Here r 1 and r 2 are the proportion of patients allocated to periods 1 and 2, respectively; "one" denotes one-to-one allocation, "opt" denotes optimal allocation and "sqrt" denotes the square root of k allocation; "T1E A i " is the estimated type 1 error when testing A i against control (i = 1, 2); "CI Width A i " and "Variance A i " refers to the width of the confidence interval and variance, respectively, for the treatment effect of arm A i against control.In this file, we provide the derivation of the optimal allocation for trials utilising concurrent controls only.In what follows, we focus on determining the optimal solutions for the Case 3 described in the paper.

Design
Note that Case 2 is a particular case of Case 3 when consider r3=0.By inspection of Figure 3 in the manuscript, one can see the decrease in variance compared to separate trials with respect to r2, and that the maximum variance reduction occurs for r1+r2=1, and thus for a two-period trial.

Set and simplify conditions
In [1] Define terms to optimise.Note: sigma*term1^(-1)/N is the variance of the estimator of effect 1 (analogously sigma*ter-m2^(-1)/N for effect 2).But since sigma and N are fixed, we simply work on term1 and term2 expressions.


The solution corresponds to the optimal allocation for p02 (Section 3.3 in the paper): Where the optimal solution for p22 can be obtained numerically by solving the following equation: In Out [12]= r2   Supplementary Material of "Optimal allocation strategies in platform trials'' Design with concurrent and non-concurrent controls -Case 2 In this file, we provide the derivation of the optimal allocation for trials utilising concurrent and non-concurrent controls.Next, we focus on determining the optimal solutions for the Case 2 described in the paper.
For simplicity of calculation, in this file we start optimising using a different parametrization.We consider: r_{i,s} = n_{i,s} /N_s, where as before n_{i,s} is the sample size for arm i in the period s, and N_s is the total sample size in period s.At the end of the document we express the solutions in terms of p_{i,s} as in the paper.

2 Figure 2 :
Figure2: Optimal allocation probabilities p i,2 , i = 0, 1, 2 in period 2 as function of r 2 and different r 1 for trials with three-periods as in Figure1.Black lines: p 0,2 , red line p 1,2 , blue line p 2,2 .The vertical line at r 2 = 1 − 2 * r 1 indicates the setting, where equal allocation between treatments 1 and 2 is optimal.There the optimal allocation ratio to control is p 0,2 = 1/(1 + √ 2) (indicated by the upper gray line).Solid lines correspond to optimal allocations in trials utilising concurrent controls only (Sect.3), and dashed lines correspond to optimal allocations in trials utilising concurrent and non-concurrent controls (Sect.4).

Table 3 :
Sample size distribution per arm and period according to the allocation strategy for a three-period design where arm 2 starts later and finishes after arm 1 does, and with N 1 = N/3, N 2 = 2(N − N 1 )/3 and N 3 = (N − N 1 )/3.

Table 1 :
Sample size distribution per arm and period according to the allocation strategy for a multi-arm trial design (one-period design).

Table 2 :
Sample size distribution per arm and period according to the allocation strategy for a two-period design where arm 2 starts later and finishes when arm 1 does, and with sample size of N 1 = N/4 in period 1 and N 2 = 3N/4 in period 2.